package org.aristotle.demo.model.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@ApiModel("用户")
public class UserVO {

    @ApiModelProperty("用户id")
    @JSONField(name = "id", serializeUsing = ToStringSerializer.class)
    private java.lang.Long id;

    @ApiModelProperty("用户名")
    @JSONField(name = "username")
    private java.lang.String username;

    @ApiModelProperty("密码")
    @JSONField(name = "password")
    private java.lang.String password;

    @ApiModelProperty("性别")
    @JSONField(name = "sex")
    private java.lang.String sex;

    @ApiModelProperty("创建时间")
    @JSONField(name = "createTime", format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date createTime;

    @ApiModelProperty("修改时间")
    @JSONField(name = "updateTime", format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date updateTime;

    @ApiModelProperty("角色：1.普通用户 2.会员用户")
    @JSONField(name = "role")
    private java.lang.Integer role;
}
